//
//  DecoratorMainPage.m
//  DesignMode
//
//  Created by wangzhipan on 2024/9/11.
//

#import "DecoratorMainPage.h"
#import "DecoratorStream.h"

@implementation DecoratorMainPage
- (void)sectionOne
{
    //在这里可以随意组合需要的功能：
    
    //1、加密文件流，然后再解密
    DeFileStream *fileStream = [[DeFileStream alloc] init];
    
    //对fileStream加密
    DeEncryptStream *encryStream = [[DeEncryptStream alloc] initWithStream:fileStream];
    
    //解密
    DeDecodeStream *decodeStream = [[DeDecodeStream alloc] initWithStream:encryStream];
    
}

- (void)sectionTwo
{
    //在这里可以随意组合需要的功能：
    
    //1、给memoryStream添加buffer
    DeMemoryStream *memoryStream = [[DeMemoryStream alloc] init];
    
    //给memoryStream添加buffer
    DeBufferStream *bufferStream = [[DeBufferStream alloc] initWithStream:memoryStream];
    
    //然后对bufferStream加密
    DeEncryptStream *encryStream = [[DeEncryptStream alloc] initWithStream:bufferStream];
    
}
@end
